import 'package:library_base/entities/generated/json/base/json_convert_content.dart';
import 'package:library_base/entities/in_order_page_detail_child_entity.dart';
import 'package:library_base/entities/in_order_page_goods_details_entity.dart';



InOrderPageDetailChildEntity $InOrderPageDetailChildEntityFromJson(Map<String, dynamic> json) {
  final InOrderPageDetailChildEntity loginBeanEntity = InOrderPageDetailChildEntity();

  final String? goodsCode = jsonConvert.convert<String>(json['goodsCode']);
  if (goodsCode != null) {
    loginBeanEntity.goodsCode = goodsCode;
  }

  final String? goodsName = jsonConvert.convert<String>(json['goodsName']);
  if (goodsName != null) {
    loginBeanEntity.goodsName = goodsName;
  }

  final String? unit = jsonConvert.convert<String>(json['unit']);
  if (unit != null) {
    loginBeanEntity.unit = unit;
  }

  final bool? singleEntry = jsonConvert.convert<bool>(json['singleEntry']);
  if (singleEntry != null) {
    loginBeanEntity.singleEntry = singleEntry;
  }

  final double? purchaseCount = jsonConvert.convert<double>(json['purchaseCount']);
  if (purchaseCount != null) {
    loginBeanEntity.purchaseCount = purchaseCount;
  }

  final double? purchaseWeight = jsonConvert.convert<double>(json['purchaseWeight']);
  if (purchaseWeight != null) {
    loginBeanEntity.purchaseWeight = purchaseWeight;
  }

  final double? stockInCount = jsonConvert.convert<double>(json['stockInCount']);
  if (stockInCount != null) {
    loginBeanEntity.stockInCount = stockInCount;
  }

  final double? stockInWeight = jsonConvert.convert<double>(json['stockInWeight']);
  if (stockInWeight != null) {
    loginBeanEntity.stockInWeight = stockInWeight;
  }

  final String? locationId = jsonConvert.convert<String>(json['locationId']);
  loginBeanEntity.locationId = locationId;

  final String? locationName = jsonConvert.convert<String>(json['locationName']);
  loginBeanEntity.locationName = locationName;


  final String? differenceReason = jsonConvert.convert<String>(json['differenceReason']);
  if (differenceReason != null) {
    loginBeanEntity.differenceReason = differenceReason;
  }

  final List<InOrderPageGoodsDetailsEntity> goodsDetails = jsonConvert.convertList(json['goodsDetails']);
  loginBeanEntity.goodsDetails = goodsDetails;

  return loginBeanEntity;
}


Map<String, dynamic> $InOrderPageDetailChildEntityToJson(InOrderPageDetailChildEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['goodsCode'] = entity.goodsCode;
  data['goodsName'] = entity.goodsName;
  data['unit'] = entity.unit;
  data['singleEntry'] = entity.singleEntry;
  data['purchaseCount'] = entity.purchaseCount;
  data['purchaseWeight'] = entity.purchaseWeight;
  data['stockInCount'] = entity.stockInCount;
  data['stockInWeight'] = entity.stockInWeight;
  data['locationId'] = entity.locationId;
  data['locationName'] = entity.locationName;
  data['differenceReason'] = entity.differenceReason;
  data['goodsDetails'] = entity.goodsDetails;
  return data;
}
